import http from '../http'

/**
 * 用户钱包列表接口
 */
function walletList(data: any) {
  return http.get('/money/api/v1/wallet/list', data)
}
/**
 * 用户总的复来券（复来券+通用复来券
 */
function getMemberTotalFulaiquan(data?: any) {
  return http.get('/money/api/v1/wallet/getMemberTotalFulaiquan', data)
}
/**
 * 用户花了还有门店余额
 */
function getMemberTotalShopMoneyHua(data?: any) {
  return http.get('money/api/v1/wallet/getMemberTotalShopMoneyHua', data)
}
/**
 * 根据钱包类型获取钱包余额
 */
function getMemberSomeWalletMoney(data?: any) {
  return http.get('money/api/v1/wallet/getMemberSomeWalletMoney', data)
}

/**
 * 用户钱包详情接口
 * @param data
 * @param data.objectType 钱包类型
 * @param data.objectId 钱包ID
 * @param data.walletRuleId 钱包规则ID
 */
function walletInfo(data: {
  objectType?: number
  objectId?: number
  walletRuleId: number
  [key: string]: any
}) {
  return http.get('/money/api/v1/wallet/info', data)
}
/**
 * 支付配置访问接口
 */
function paymentConfig(data: any) {
  return http.get('/money/api/v1/payment/config/list', data)
}
/**
 * 支付配置让利规则访问接口
 */
function getProductDeductionMaxMoney(data: any) {
  return http.get('/money/api/v1/money/rule/getProductDeductionMaxMoney', data)
}

/**
 * 用户钱包跟踪明细列表接口
 */

function walletFlowInfo(data: any) {
  return http.get('/money/api/v1/wallet/flow/info', data)
}
function walletFlowList(data: any) {
  return http.get('/money/api/v1/wallet/flow/list', data)
}
function queueList(data: any) {
  return http.get('/money/api/v1/source/transfer/queue/list', data)
}
function queueShopList(data: any) {
  return http.get('/money/api/v1/source/transfer/queue/shopList', data)
}
function batchTransferToMoneyScoreForIos(data: any) {
  return http.post(
    '/money/api/v1/source/transfer/queue/batchTransferToMoneyScoreForIos',
    data
  )
}
function shopCountTransfer(data: any) {
  return http.post('/money/api/v1/wallet/shop/count/transfer', data)
}

export default {
  walletList,
  walletInfo,
  getMemberTotalFulaiquan,
  getMemberTotalShopMoneyHua,
  getMemberSomeWalletMoney,
  paymentConfig,
  getProductDeductionMaxMoney,
  walletFlowInfo,
  walletFlowList,
  queueList,
  queueShopList,
  batchTransferToMoneyScoreForIos,
  shopCountTransfer
}
